package com.ruoyi.airspaceFlight.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.airspaceFlight.mapper.TTaskNatureMapper;
import com.ruoyi.airspaceFlight.domain.TTaskNature;
import com.ruoyi.airspaceFlight.service.ITTaskNatureService;

/**
 * 任务性质Service业务层处理
 * 
 * @author zc
 * @date 2023-10-30
 */
@Service
public class TTaskNatureServiceImpl implements ITTaskNatureService 
{
    @Autowired
    private TTaskNatureMapper tTaskNatureMapper;

    /**
     * 查询任务性质
     * 
     * @param taskNatureId 任务性质主键
     * @return 任务性质
     */
    @Override
    public TTaskNature selectTTaskNatureByTaskNatureId(String taskNatureId)
    {
        return tTaskNatureMapper.selectTTaskNatureByTaskNatureId(taskNatureId);
    }

    /**
     * 查询任务性质列表
     * 
     * @param tTaskNature 任务性质
     * @return 任务性质
     */
    @Override
    public List<TTaskNature> selectTTaskNatureList(TTaskNature tTaskNature)
    {
        return tTaskNatureMapper.selectTTaskNatureList(tTaskNature);
    }

    /**
     * 新增任务性质
     * 
     * @param tTaskNature 任务性质
     * @return 结果
     */
    @Override
    public int insertTTaskNature(TTaskNature tTaskNature)
    {
        tTaskNature.setCreateTime(DateUtils.getNowDate());
        return tTaskNatureMapper.insertTTaskNature(tTaskNature);
    }

    /**
     * 修改任务性质
     * 
     * @param tTaskNature 任务性质
     * @return 结果
     */
    @Override
    public int updateTTaskNature(TTaskNature tTaskNature)
    {
        tTaskNature.setUpdateTime(DateUtils.getNowDate());
        return tTaskNatureMapper.updateTTaskNature(tTaskNature);
    }

    /**
     * 批量删除任务性质
     * 
     * @param taskNatureIds 需要删除的任务性质主键
     * @return 结果
     */
    @Override
    public int deleteTTaskNatureByTaskNatureIds(String[] taskNatureIds)
    {
        return tTaskNatureMapper.deleteTTaskNatureByTaskNatureIds(taskNatureIds);
    }

    /**
     * 删除任务性质信息
     * 
     * @param taskNatureId 任务性质主键
     * @return 结果
     */
    @Override
    public int deleteTTaskNatureByTaskNatureId(String taskNatureId)
    {
        return tTaskNatureMapper.deleteTTaskNatureByTaskNatureId(taskNatureId);
    }
}
